anti-archiveinvalidation BSA patcher by Timeslip
http://timeslip.chorrol.com

Requires either mono, .NET 1.1 or .NET 2.0.

based off obmm 0.7.10

This utility is not meant for general use, and is just a stopgap measure for people unable or unwilling to use obmm until a similar feature gets added to AVC, wyre bash, or any other archiveinvalidation tool.

Do not use this utility if you already have obmm installed, as you risk permenant BSA archive corruption.

*************
*** usage ***
*************

Extract BSAPatch.exe into Oblivion's data directory and run it. It will tell you exactly which files in the BSA have been patched. To undo the changes, run it a second time. Each time you install new texture replacer mods, you will need to run this utility again. When you remove a texture replacer mod, remember to undo the changes.

With its default settings, this utility will delete the archiveinvalidation file from the oblivion folder automatically.

For additional options, this utility can be run from the command line. It accept the following extra arguments:

d-	: Don't display names of matched directories
f-	: Don't display names of edited files
w-	: Don't display any warnings
a-	: Don't create an archiveinvalidation file when hash map collisions occur

Leave a space between each one if you want to specify multiple arguments.

********************
*** known issues ***
********************

Oblivion uses an incredably crappy hashing algorithm, where flipping the final bit of the data being hashed only flips the final bit of the hash. This caused all sorts of hash collision problems with the original version of this utility, which was based off obmm 0.7.8. (Which also suffered the same problems.)

While these problems are mostly fixed now, it remains impossible to edit a file which is in the middle of 3+ files which have incremating hashes. In the case of 3 files named 'file01.dds', 'file02.dds' and 'file03.dds', it would be impossible to use this utility if a replacer only replaced 'file02.dds' and required 01 and 03 to be loaded from the BSA. If this happens, the utility will alert you to the problem file name, and will also generate a mini archiveinvalidation file containing the problem entries.

***************
*** credits ***
***************

* Ghostwheel
For decoding the BSA file format, and hence making this utility possible in the first place.

* Dev_akm, Wonder Dog, DoomedMarauder and more other people than I can count
For researching the exact behaviour of the archiveinvalidation file. Even if it doesn't seem to have any actual rules, it does at least seem to follow guidelines.

* Malifrax
For being brave enough to be the first person to test the obmm 0.7.7 beta. (During it's creation, I managed to corrupt 4 BSA archives. Alas, I'd only backed up 3 of them. I hate having to reinstall oblivion...)